package open.witype.filetiper.service;

import android.app.Service;
import android.content.Intent;
import android.os.Binder;
import android.os.IBinder;
import android.support.annotation.Nullable;
import android.widget.Toast;

/**
 * Created by Typer on 2015/6/1 0001.
 *
 */
public class FileScanService extends Service {

    private IBinder binder = new ServiceBinder();

    @Nullable
    @Override
    public IBinder onBind(Intent intent) {
        return binder;
    }

    @Override
    public void onCreate() {
        super.onCreate();
        Toast.makeText(getApplicationContext(),"onCreate",Toast.LENGTH_LONG).show();
    }

    @Override
    public int onStartCommand(Intent intent, int flags, int startId) {
        Toast.makeText(getApplicationContext(),"onStartCommand",Toast.LENGTH_LONG).show();
        return START_REDELIVER_INTENT;
    }

    public class ServiceBinder extends Binder{
        public ServiceBinder getService(){
            return ServiceBinder.this;
        }
    }
}
